# Author:sp
# CreaTime: $(DATE)
# FileName: $(NAME)
# Description: simple introdution of the code
class Person(object):              #Person继承object类
    def __init__(self,name,age):
        self.name=name
        self.age=age
    def info(self):
        print(self.name,self.age)

class Student(Person):
    def __init__(self,name,age,number):
        """
        其中name，age是继承父类的属性，number是子类特有的属性
        初始化父类的属性
        再初始化子类的特有属性
        """
        super().__init__(name,age)
        self.number=number

class Teacher(Person):
    def __init__(self,name,age,teachofage):
        super().__init__(name,age)
        self.teachofage=teachofage

stu=Student('张三',15,'1001')
teacher=Teacher('李四',40,15)
stu.info()
teacher.info()
#多继承
class A(object):
    pass
class B(object):
    pass
class C(A,B):
    pass






